% \usepackage[T1]{fontenc} % 字体的编码, 不是 input 的编码utf-8, pdflatex only
%%%+++++++++++++++++++++++++++++++
\usepackage{geometry} % 整体页面设置
\geometry{a4paper} %页面大小是A4纸
\geometry{top=2cm} %设置版心顶部距离
%\geometry{textheight=22cm}  %设置版心长度
%\geometry{centering} % 水平、竖直均居中
\geometry{textwidth=17cm} 
%++++++++++++++++++++++++++++++++++++++++++++++++
\usepackage{eso-pic}
% This package makes it easy to add some picture commands to every page at ab-solute positions
\usepackage{float}%使用[H]选项将浮动题放到确定的位置
\usepackage{hyperref,graphicx,xcolor} %超链接，图形包，图片
%\definecolor{ocre}{RGB}{243,102,25} %定义一个颜色
% xcolor package starts from the basic facilities of the 
% color package, and provides easy driver-independent access
%to several kinds of color tints, shades, tones, 
%and mixes of arbitrary colors
\usepackage{fontspec}
\usepackage{esint} %使用Computer Modern字体时,esint软件包增加额外的积分符号，例如\oiint.
\usepackage{amsmath,amsfonts} % 数学字体
\usepackage{amsbsy} %产生粗体数学符号, 通过宏\boldsymbol 使用
\usepackage{amssymb} %定义ams 字体包msam和msbm中所有数学符号的名称
\usepackage{mathrsfs} % 提供了mathscr 命令
\usepackage{amscd} % ams 画交换图
\usepackage{mathtools}% 定义配对的数学符号,在 unicode-math 之前调用
\usepackage{ytableau} % Young tableaux and diagrams
%++++++++++++++++++++++++++++++++++++++++
% 设置英文字体
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Roman}
%设置数学字体
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
%开源数学字体见 http://www.gust.org.pl/projects/e-foundry/lm-math
% DejaVu Math TeX Gyre, Latin Modern Math, TeX Gyre Pagella Math, TeX Gyre Termes Math, TeX Gyre Schola Math
% TeX Gyre Bonum Math, Noto Sans Math, TeX Gyre DejaVu Math, STIX Two Math
%++++++++++++++++++++++++++++++++++++++++
\usepackage{enumerate} 
\usepackage{tikz}% 费曼图及其他作图
\usetikzlibrary{cd}%commutative diagram交换图
%\usetikzlibrary{shapes.misc,animations}
%\usetikzlibrary{shapes.geometric}% tikz node 形状的库
\usepackage{physics} % 物理包
\usepackage{siunitx} % 国际单位制
\DeclareSIPrePower\quartic{4}%单位的四次方
%\usepackage{braket} % Dirac bra-ket notation% useful for Feynman slash notation
\usepackage{slashed} % also for slash notation: take your pick!
\usepackage{simplewick} 
% a simple means of drawing Wick contractions above and below expressions. 
\usepackage{makeidx} 
% Standard package for creating indexes
\usepackage{multirow}
%%%+++++++++++++++++++++++++++++++
\usepackage{listings}
% 在LaTex中添加代码高亮
\usepackage{framed}
% 在对象周围添加方框，阴影等等，允许跨页
\definecolor{shadecolor}{rgb}{0.9,0.9,0.9}
%定义各种颜色
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
%\lstdefinestyle{〈style name〉}{〈key=value list〉}
%stores the key=value list
\lstdefinestyle{codestyle1}{
    backgroundcolor=\color{backcolour},   
    commentstyle=\color{codegreen},
    keywordstyle=\color{magenta},
    numberstyle=\tiny\color{codegray},
    stringstyle=\color{codepurple},
    basicstyle=\footnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}
%%++++++++++++++++++++ 
%\DeclarePairedDelimiter\abs{\lvert}{\rvert}
%\DeclareMathOperator{\Tr}{Tr} %矩阵求迹的符号
% * 号版本可以把上下标放在符号的正上方/正下方
\DeclareMathOperator{\ree}{Re}
\DeclareMathOperator{\imm}{Im}
\DeclareMathOperator{\diag}{diag} %对角矩阵
\DeclareMathOperator{\res}{Res} %复变函数的留数
\DeclareMathOperator{\disc}{Disc} %定义复变函数不连续符号
\DeclareMathOperator{\sign}{Sign} %符号函数
\DeclareMathOperator{\fmp}{P} %定义费曼传播子的符号
\DeclareMathOperator{\erfc}{erfc}%误差函数填补
\DeclareMathOperator{\sinc}{sinc}% 函数 sin x/x
\DeclareMathOperator{\siint}{Si}
\DeclareMathOperator{\arctanh}{ArcTanh}
%\newcommand*{\dd}{\mathop{}\!\mathrm{d}}%普通微分
\newcommand*{\DD}{\mathop{}\!\mathrm{D}}%泛函变分
%\renewcommand{\boldsymbol}{\symbf} %重定义 ams 包的黑体
\newcommand*{\sbf}{\symbf} %粗体数学符号或矢量符号
\newcommand*{\tps}[1]{{#1^\mathsf{T}}} %矩阵转置
\newcommand*{\ssl}{\mathbin{/\mkern-5.5mu/}}%定义双斜线符号.
\newcommand*{\sla}{\slashed}% feynman slash
